//
//  ComposeItem.m
//  Golf
//
//  Created by 周成龙 on 16/11/3.
//  Copyright © 2016年 ZCL. All rights reserved.
//

#import "ComposeItem.h"

@implementation ComposeItem


- (CGRect)titleRectForContentRect:(CGRect)contentRect {
    CGFloat h = contentRect.size.height;
    CGFloat y = h * (1-_rate);
    return CGRectMake(-2, y, contentRect.size.width+5, h*_rate);
}

- (CGRect)imageRectForContentRect:(CGRect)contentRect {
    
    CGFloat h = contentRect.size.height*(1-_rate);
    CGFloat width = contentRect.size.width - 4;
    CGFloat height = width>h ? h : width;
    width = height;
    return CGRectMake(2, 0, width, height);
}

@end
